﻿#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <string.h>

void leftchange(char ch[4], int len, int k)
{
	while (k > 0)
	{
		int i = 0;
		char t = ch[i];
		for (i = 0; i < len-1 ; i++)
		{
			ch[i] = ch[i + 1];
		}
		ch[i] = t;
		k--;
	}
	printf("%s\n", ch);
}

int main()
{
	char ch[] = "ABCD";
	int len = strlen(ch);
	int k;
	printf("请输入左旋字符个数：");
	scanf("%d", &k);
	leftchange(ch, len, k);

	return 0;
}